<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.ArrayList,
                 com.scalar.chiptrack.operations.process.dao.FabDAO,
                 com.scalar.chiptrack.commons.Location,
                 java.util.ArrayList,
                 com.scalar.chiptrack.operations.process.VendorLocation,
                 com.scalar.chiptrack.operations.vendor.dao.VendorDAO,
                 com.scalar.chiptrack.utils.ConfigManager,
				 com.scalar.chiptrack.operations.process.forms.FabForm"%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/fabAction.do"/>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<%

  HttpSession ses = request.getSession(true);
  java.util.ArrayList list = new java.util.ArrayList();
  list.add(new org.apache.struts.util.LabelValueBean("As Needed     ", "asneeded"));
  list.add(new org.apache.struts.util.LabelValueBean("Weekly", "weekly"));
  list.add(new org.apache.struts.util.LabelValueBean("Monthly", "monthly"));
  list.add(new org.apache.struts.util.LabelValueBean("Quarterly", "quarterly"));
  pageContext.setAttribute("poFrequencies", list);

%>


<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<script language="javaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>
<script language="javaScript" src="<%=chipTracContext%>/jsp/includes/scripts/fab_process.js"></script>
<script language="javaScript" src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script language="javaScript">
function back(){
       window.location = '<%=chipTracContext%>/processView.do?action=true&productID=<%=session.getAttribute("productId")%>';
    }
</script>

</HEAD>
<BODY bgColor='#ffffff' leftMargin='0' topMargin='0' marginheight='0' marginwidth='0' onLoad='javascript:whileLoad();'>

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<html:form name="fabprocess" type="com.scalar.chiptrack.operations.process.forms.FabForm" action="/fabAction" enctype="multipart/form-data">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%@ include file="/jsp/operations/operations_menu.jsp" %>

	</TD>
<!-- end of the side navigations -->

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="90%" align=right>

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->

<html:hidden property="processStepId" name="fabForm" />
<html:hidden property="procedureDocId" name="fabForm" />
<html:hidden property="maskDocId" name="fabForm" />

<center><span class="NArialW">FAB</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>
<table  width="90%" border="0">
<tr>
<td align="left" class="NArialL" >
<strong><font color="FF0000"><font id="message"></font></font>
</td>
</tr>
</table>

<font class="NArialL">

<table border="0" width="90%">
<tr><td colspan='5'><chiptrack:errors styleClass='NArialL'/></td></tr>
  <tr>
    <td width="21%"><font class="NArialL">FAB Product Name:</font><font color="RED" size="1"><B>*</B></font></td>
    <td width="28%" align="left">
	<html:text  property="fabName"  name="fabForm"  size="17" styleClass="txfield" maxlength="50"/><a href="javascript:addDupPartNumber('dupProductName','FAB Product Name');" title='Click here to add duplicate Product Name'><img border=0 src='<%=chipTracContext%>/jsp/includes/images/add.jpg' height='15' width='20' align=center></a>
    </td>
    <td width="5%">&nbsp;</td>
    <td width="18%"><font class="NArialL"> Gross Die/Wafer:</font></td>
    <td width="37%" align="left">
	<html:text  property="gross" name="fabForm" size="16" styleClass="txfield" /></td>
  </tr>

	<logic:iterate name="fabForm" property="dupProductName" id="xxxx">
		<tr>
			<td width="21%"><font class="NArialL"><font color=green>FAB Product Name:</font></font></td>
			<td width="28%" align="left">
				<input type="text" name="dupProductName" value="<%=xxxx%>" class="txfield" size="17" maxlength="50" >
			</td>
		</tr>
	</logic:iterate>
  <tr>
	<td colspan='5'><font id="font1"></font></td>
  </tr>
  <tr>
    <td width="21%"><font class="NArialL">Lot Hold Yield Limit:</font></td>
    <td width="28%" align="left">
        <p><html:text property="lotHoldYieldLimit" name="fabForm" size="17" styleClass="txfield" /></p>
    </td>
    <td width="5%">&nbsp;</td>
    <td width="18%"><font class="NArialL">P O Frequency:</font></td>
    <td width="37%" align="left">
	 <html:select property="poFrequency" name="fabForm" styleClass="txfield"  >
		<html:option value="0">Select</html:option>
		<html:options collection="poFrequencies" property="value" labelProperty="label"/>
     </html:select>
        </td>
  </tr>
  <tr>
    <td width="21%"><font class="NArialL">Standard Unit Cost:</font></td>
    <td width="28%" align="left">
	<html:text property="standardUnitCost" name="fabForm" size="17" styleClass="txfield" /></td>
    <td width="5%">&nbsp;</td>
    <td width="18%"><font class="NArialL">Lot Scrap Yield Limit:</font></td>
    <td width="37%" align="left">
	<html:text property="lotScrapYieldLimit" name="fabForm" size="16" styleClass="txfield" /></td>
  </tr>
  <tr>
    <td width="21%"><font class="NArialL">Procedure Doc. No:</font></td>
    <td width="28%" align="left">
<html:text property="procDocNo" size="17" styleClass="txfield" name="fabForm" />
    </td>
    <td width="5%">&nbsp;</td>
    <td width="18%"><font class="NArialL">Mask ID&nbsp; No:</font></td>
    <td width="37%" align="left">
	<html:text property="maskIdNo"  name="fabForm" size="16" styleClass="txfield" />
   </td>
  </tr>
 <tr>
    <td width="21%"><font class="NArialL">Procedure Doc File:</font></td>
    <td width="28%" align="left">
  <html:file  property="procDocFile"  name="fabForm" size="9" styleClass="txfield" />
    </td>
    <td width="5%">&nbsp;</td>
    <td width="18%"><font class="NArialL">Mask ID File:</font></td>
    <td width="37%" align="left">
 <html:file property="maskIdFile" name="fabForm" size="9" styleClass="txfield" />
   </td>
  </tr>
  <tr>
    <td width="21%">&nbsp;</td>
    <td width="28%" align="center">
	&nbsp;
    </td>
    <td width="5%">&nbsp;</td>
    <td width="18%"><font class="NArialL">Target Yield:</font></td>
    <td width="37%" align="left"><font class="NArialL">
	<html:text property="targetYield"  name="fabForm" size="16" styleClass="txfield" />

    </font>

    </td>
  </tr>
 </table>
 <table border=0 width="90%">
  <tr><td><font class="NArialL">Comments:</font></td></tr>
  <tr><td><font class="NArialL">
  <html:textarea rows="4" property="comments"  name="fabForm" cols="94" styleClass="txfield" /></textarea></font></td></tr>
  <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spaceer.gif" height=10></td></tr>
  <!-- removed by hareesh on 16th September 2003 -->
  <!--tr><td><font class="NArialL">To add the recipes for this FAB, please click the button here
   <a href="javascript:recipe()">  <img border="0" src="<%=chipTracContext%>/jsp/includes/images/recipe.gif" width="61" height="17" valign=center></a>
  </td></tr-->
 </table>
<br>
  <table border='0' width='90%' bordercolor='#FFFFFF' align='center'>
    <tr>
     <!-- <td class="NArialL"></td> -->
      <td colspan=10 class="NArialL"> Vendor Location Information</td></tr>

    <tr>
	  <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Select</font></td>
      <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Priority</font></td>
      <td width="15%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Location</font></font></td>
      <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">% Split</font></font></td>
      <td width="10%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Capacity/Week</font></td>
      <td width="10%" align="center" bgcolor="#993333" colspan="2">
      <p align="center"><font color="#FFFFFF" class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;
      <font class="NArialL"><font color="#FFFFFF">Cost/Unit&nbsp;&nbsp;</font>&nbsp;<font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;
      <font color="#FFFFFF">Normal&nbsp; Express</font>
       </p>
       </font>
        </font></font>
      </td>

	  <td width="10%" align="center" bgcolor="#993333" colspan="2">
      <p align="center"><font color="#FFFFFF" class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;
      <font class="NArialL"><font color="#FFFFFF">Cycle Time&nbsp;&nbsp;</font>&nbsp;<font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;
        <font color="#FFFFFF">Normal&nbsp; Express</font>
        </p>
        </font>
        </font></font>
      </td>

      <td width="10%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Expected
        Yield</font></font></td>
    </tr>

	<%

	ArrayList vendorLocations =(ArrayList) request.getAttribute("vendorLocations");
	ses.setAttribute("vendorLocations",vendorLocations);

	if (vendorLocations == null) vendorLocations = new ArrayList();
    int size = vendorLocations.size();

	try{
    VendorLocation location = null;
    for (int i=0; i<size; i++) {
    location = (VendorLocation) vendorLocations.get(i);
	%>


    <tr>
	 <td width="5%" align="center" bgcolor="#DEE1E2">
<input type=checkbox name="checkLoc<%=i%>" <%if((location.getSelect() != null) && (location.getSelect().trim().length() != 0)) out.print ("checked");%> class="txfield" onclick="checkLocation(<%=i%>,'checkLoc')" value="off" ></font>

 </td>

	<td width="5%" align="center" bgcolor="#DEE1E2">
	<input text name="priority" size="5" class="txfield" disabled="true" value='<%if(location.getPriority()!=null){%><%=location.getPriority()%><%}%>'></font>
	</td>

	<td width="15%" align="center" bgcolor="#DEE1E2"><font class="NArialL">

	<input type="text"  name="locationName" size="17" class="txfield" disabled="true" value='<%=location.getLocationName()%>' /></font>
	</td>

	<td width="5%" align="center" bgcolor="#DEE1E2"><font class="NArialL">
	<input type="text"  name="split" size="7" class="txfield" disabled="true" value='<%if(location.getSplit()!=null){%><%=location.getSplit()%><%}%>' ></font>
	</td>

	<td width="10%" align="center" bgcolor="#DEE1E2"><font class="NArialL">
	<input type="text" name="capacityWeek"  disabled="true" size="8" class="txfield" value='<%if(location.getCapacityWeek()!=null){%><%=location.getCapacityWeek()%><%}%>'>
	</font>
	</td>

	<td width="5%" align="center" bgcolor="#DEE1E2"><font class="NArialL">
	<input type="text" name="normalCost" disabled="true" size="7" class="txfield" value='<%=location.getNormalCost()%>'></font>
	</td>

	<td width="5%" align="center" bgcolor="#DEE1E2"><font class="NArialL">
	<input type="text" name="expressCost" disabled="true" size="7" class="txfield" value='<%=location.getExpressCost()%>'></font>
	</td>

	<td width="5%" align="center" bgcolor="#DEE1E2"><font class="NArialL">
	<input type="text"  name="normalCycleTime" disabled="true" size="7" class="txfield" value='<%if(location.getNormalCycleTime()!=null){%><%=location.getNormalCycleTime()%><%}%>' /></font></td>

	<td width="5%" align="center" bgcolor="#DEE1E2"><font class="NArialL">
  <input type="text" name="expressCycleTime" disabled="true" size="7" class="txfield" value='<%if(location.getExpressCycleTime()!=null){%><%=location.getExpressCycleTime()%><%}%>' ></font></td>

  <td width="10%" align="center" bgcolor="#DEE1E2"><font class="NArialL">
  <input type="text" name="expectedYield" disabled="true" size="8" class="txfield" value='<%=location.getExpectedYield()%>'></font></td>
  </tr>
  <input type="hidden" name="locationID" value='<%=location.getLocationID()%>' />
 <%}
	}catch(Exception e){e.printStackTrace();}
  %>

  </table>

  <input type="hidden" name="count" value="<%=size%>" >
  <!-- changed by hareesh on 16th Setpemeber 2003 -->
  <p align="center">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <chiptrack:restrictedLink functionality='<%=Functionality.PRODUCT_SETUP%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:back();' onmouseover="window.status='Click here to go back to Process View';return true" onmouseout="window.status='';return true">
  <img border='0' src='<%=chipTracContext%>/jsp/includes/images/back.gif'></chiptrack:restrictedLink></a>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <!--a href="javascript:next('<%=size%>');"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" ></a-->
  <chiptrack:restrictedLink functionality='<%=Functionality.PRODUCT_SETUP%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:next();' onmouseover="window.status='Click here to save this FAB Process';return true" onmouseout="window.status='';return true">
  <img border='0' src='<%=chipTracContext%>/jsp/includes/images/save.gif'></chiptrack:restrictedLink>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </p>


<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

<!-- Footer starts here -->

<%@ include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->

</BODY>
</html:form>
</HTML>